import React, { useEffect, useState } from "react";

const Son = props => {
  const [sonData] = useState("我是子组件的数据");
  // console.log(props);
  useEffect(() => {
    props.onFather(sonData);
  }, [props]);

  return (
    <div className="App">
      <h3>我是子组件</h3>
    </div>
  );
};

export default Son;
